package com.mine.crawler.main;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.apache.log4j.Logger;

import com.mine.crawler.config.InitializeCrawlerApplication;
import com.mine.crawler.util.urlLink;

public class CrawlerData
{
	private static Logger log = Logger.getLogger(CrawlerData.class);
	Properties InitConfig = InitializeCrawlerApplication.getInitConfig();
	
	private static long startTime;
	public static boolean stopCrawler = false;

	Map<Integer, urlLink> linkMapPartial;
	Map<Integer, urlLink> linkMap;
	
	public void CrawlerData()
	{
		linkMapPartial = 
			new HashMap<Integer, urlLink> (Integer.parseInt((String)InitConfig.get("URL_listSize_perHTML_line")));
		linkMap = 
			new HashMap<Integer, urlLink>(Integer.parseInt((String)InitConfig.get("URL_listSize")));
	}
	
	public void InitStartTime()
	{
		startTime = System.currentTimeMillis();		
	}
	
	public void addLinkMap(int key_local, urlLink url_local)
	{
		linkMap.put(key_local, url_local);
	}

}
